define(['jquery'],() => {
    class Request{
        constructor(){
            this.baseUrl = '/xmyx'
        }
        getIndexName(){
            return $.ajax({
                url:'/lib/mockjson/indexProd.json',
                type:'get',
                dateType:'json'
              })
        }
        getIndexTab(){
            return $.ajax({
                url:`${this.baseUrl}/api/tabs?sa=`,
                type:'get',
                dateType:'json'
              })
        }
        getListProdData(prodId){
            return $.ajax({
                url:`${this.baseUrl}/api/tab/${prodId}?start=0`
            })
        }
        getDetailsData(prodId){
            return $.ajax({
                url:`${this.baseUrl}/api/detail?id=${prodId}&normal=1&sa=`
            })
        }
    }
    return new Request()
})